<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <meta http-equiv="X-UA-Compatible" content="ie=edge" />
  <title>计数器</title>
  <link rel="stylesheet" href="css/index.css" />
</head>

<body>
  <!-- html结构 -->
  <div id="app">
    <!-- 计数器功能区域 -->
    <div class="input-num">
      <button @click="jian">
        -
      </button>
      <span>{{num}}</span>
      <button @click="jia">
        +
      </button>
    </div>
    <img src="http://qnaaa.zzaaa.net/aaajy/logo.png" alt="" />
  </div>
  <!-- 开发环境版本，包含了有帮助的命令行警告 -->
  <script src="../js/vue.js"></script>
  <!-- 编码 -->

</body>
<script>
  let app=new Vue({
    el:"#app",
    data:{
      num:0,
    },
    methods:{
      jia(){
        this.num++;
      },
      jian(){
        this.num--;
      }
    }
  })
</script>

</html>